package org.example.controller;

import org.example.common.GlobalConts;
import org.example.common.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping("user")
public class UserController {
    @Autowired
    HttpServletRequest request;

    @RequestMapping("list")
    public R list(){
        String loginUserId = request.getHeader(GlobalConts.LOGIN_SUCCESS_USER_HEADER_KEY);
        System.out.println("loginUserId="+loginUserId);
        System.out.println("list接口被调用");
        return R.successed(null);
    }
}
